/**
 * Created by Administrator on 2017/3/13 0013.
 */

import React from "react";


/*导出组件*/
export default class AddDepartment extends React.Component{
    constructor(props){
        super(props)
        this.state={
            ischose:false
        }
        this.chose=1
    }

    onchose(){
        this.setState({
            ischose:true
        });
        this.chose = 0
    }
    unchose(){
        this.setState({
            ischose:false
        });
        this.chose = 0
    }
    touch(context,index){
        // this.setState({
        //     ischose:true
        // });

        this.props.onchose(context,index)
    }
    
    render(){
        return (
            <div >
                <p  className={this.state.ischose?'people_left_tabafter people_left_tab':"people_left_tab"}  onClick={this.touch.bind(this,this.props.context,this.props.index)}>{this.props.context}</p>
            </div>
        )
    }
}